<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib tagdir="/WEB-INF/tags/html" prefix="html"%>
<%@ page session="false"%>

<c:forEach items="${articles}" var="article">
  <html:article 
    articleId="${article.id}" 
    created="${article.created}"
    title="${article.title}" 
    authorId="${article.author.id}"
    authorName="${article.author.name}">${article.body}
    </html:article>
  <div id="js-comments-${article.id}" style="display: none">
    <c:forEach items="${article.comments}" var="comment">
      <html:comment 
        authorName="${comment.author.name}"
        authorId="${comment.author.id}" 
        created="${comment.created}">${comment.body}</html:comment>
    </c:forEach>
  </div>
  <div class="article-spacer"></div>
</c:forEach>